From: kaf24@firebug.cl.cam.ac.uk Date: Wed, 13 Sep 2006 13:12:28 +0000 (+0100) Subject: [HVM] Add broadcast destination for physical destination mode in X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15658^2~53^2~9 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=94170dd0f6761c67a67a5ede51d32052950d2430;p=xen.git [HVM] Add broadcast destination for physical destination mode in VLAPIC. Based on a patch from Xiaohui Xin Signed-off-by: Keir Fraser --- diff --git a/xen/arch/x86/hvm/vioapic.c b/xen/arch/x86/hvm/vioapic.c index 8e3b9f9593..2999bfe4f1 100644 --- a/xen/arch/x86/hvm/vioapic.c +++ b/xen/arch/x86/hvm/vioapic.c @@ -362,21 +362,35 @@ static uint32_t ioapic_get_delivery_bitmask(hvm_vioapic_t *s, ASSERT(s); - if (dest_mode == 0) { /* Physical mode */ - for (i = 0; i < s->lapic_count; i++) { - if (VLAPIC_ID(s->lapic_info[i]) == dest) { + if ( dest_mode == 0 ) + { + /* Physical mode. */ + for ( i = 0; i < s->lapic_count; i++ ) + { + if ( VLAPIC_ID(s->lapic_info[i]) == dest ) + { mask = 1 << i; break; } } - } else { - /* logical destination. call match_logical_addr for each APIC. */ - if (dest != 0) { - for (i=0; i< s->lapic_count; i++) { + + /* Broadcast. */ + if ( dest == 0xFF ) + { + for ( i = 0; i < s->lapic_count; i++ ) + mask |= ( 1 << i ); + } + } + else + { + /* Logical destination. Call match_logical_addr for each APIC. */ + if ( dest != 0 ) + { + for ( i = 0; i < s->lapic_count; i++ ) + { if ( s->lapic_info[i] && - ioapic_match_logical_addr(s, i, dest) ) { + ioapic_match_logical_addr(s, i, dest) ) mask |= (1<